#!/usr/bin/env bash

if [[ -f /usr/bin/yum ]];then
    ins="yum -y"
    yum -y install epel-release
elif [[ -f /usr/bin/apt ]]; then
    ins="apt"
fi

$ins install git
$ins install zsh


if [[ ! -d ~/.oh-my-zsh/ ]];then
    sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
fi


mv ~/.zshrc ~/.zshrc.bak

wget -q https://gitee.com/ECH0/init/raw/master/zshrc-template -O ~/.zshrc

wget -qO- https://gitee.com/ECH0/init/raw/master/oh-my-zsh.tar.gz | tar zxvf - -C ~/.oh-my-zsh/    

source ~/.zshrc